package FunctionalClass;

public class Bit_Operation {
	
	public void bitSet(byte[] bits, int b) {
		int byte_pos = b/8, bit_pos = b%8;
		bits[byte_pos] |= 1<<bit_pos;
	}
	public void bitUnSet(byte[] bits, int b) {
		int byte_pos = b/8, bit_pos = b%8;
		bits[byte_pos] &= ~(1<<bit_pos);
	}
	public boolean bitTest(byte[] bits, int b) {
		int byte_pos = b/8, bit_pos = b%8;
		return ( bits[byte_pos] & (1<<bit_pos) ) > 0;
	}
	
	
}
